Skip to content

Conversation

@RasPhilCo
Copy link
Contributor

@RasPhilCo RasPhilCo commented Jul 19, 2022

What does this PR do?

Remove -j from json flag and moves --json into global flags in help

Use this.warn to add warnings to json object

Return result from run for json handler & schema check

What issues does this PR fix or reference?

@W-00000000@

@git2gus
Copy link

git2gus bot commented Jul 19, 2022

Git2Gus App is installed but the .git2gus/config.json doesn't exist.

@RasPhilCo RasPhilCo marked this pull request as ready for review July 19, 2022 16:57
@RasPhilCo RasPhilCo requested review from RodEsp and saracope and removed request for RodEsp July 19, 2022 16:58
@RasPhilCo RasPhilCo requested a review from RodEsp July 19, 2022 17:00
@RasPhilCo RasPhilCo changed the title fix: remove short flag -j for json fix: remove short flag -j for json and return response to global json handler Jul 20, 2022
@RasPhilCo RasPhilCo requested review from RodEsp and saracope July 20, 2022 17:47
Copy link
Contributor

@RodEsp RodEsp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good to me but I'm not setup to run commands against an org with functions enabled so I can't QA. Trusting you guys are 😄

Comment on lines -67 to -69
if (!flags.json) {
cli.action.start(`Creating compute environment for org ID ${orgId}`);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you QA this?
I'm not sure that cli.action.start() has the same --json checks that this.log() does.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actions go out on stderr, so this shouldn't matter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"He says 99% sure."

Copy link
Contributor Author

@RasPhilCo RasPhilCo Jul 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/oclif/cli-ux/blob/21e8525497e6b4e9b4fa6cc1e2006bae2ff402eb/src/action/base.ts#L29

$ ./bin/dev logout functions --json 1>/dev/null
Logging out of Salesforce Functions... done

$ ./bin/dev logout functions --json 2>/dev/null
{
  "status": 0,
  "result": "Logged out",
  "warnings": []
}

@RasPhilCo RasPhilCo merged commit e63ff43 into main Jul 20, 2022
@RasPhilCo RasPhilCo deleted the pn/json-flag-help branch July 20, 2022 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants